
    <div class="row vertical-offset-100" ng-controller="RegisterController as register">
        <div class="col-md-4 col-md-offset-4">
            <div class="panel panel-default" id="signupbox">
                <div class="panel-heading">
                    <h3 class="panel-title">账号注册</h3>
                </div>
                <div class="panel-body">
                    <form accept-charset="UTF-8" role="form" ng-submit="register.register()" name="form"  id="registerform">
                        <div class="form-group" ng-class="{ 'has-error': form.email.$dirty && (form.email.$error.required || form.email.$error.email) }">
                            <label for="email">邮箱</label>
                            <input type="email" name="email" id="email" class="form-control" ng-model="register.email" required />
                            <span ng-show="form.email.$dirty && form.email.$error.required" class="help-block">请输入邮箱</span>
                            <span ng-show="form.email.$dirty && form.email.$error.email" class="help-block">邮箱格式有误</span>
                        </div>

                        <div class="form-group" ng-class="{ 'has-error': form.username.$dirty && (form.username.$error.required || form.username.$error.username) }">
                            <label for="username">用户名</label>
                            <input type="text" name="username" id="username" class="form-control" ng-model="register.username" required />
                            <span ng-show="form.email.$dirty && form.email.$error.required" class="help-block">请填写用户名</span>
                            <!--<span ng-show="form.username.$dirty && form.username.$error.username" class="help-block">Email is invalid</span>-->
                        </div>



                        <div class="form-group" ng-class="{ 'has-error': form.password.$dirty && (form.password.$error.required || form.password.$error.password) }">
                            <label for="password">密码</label>
                            <input class="form-control" placeholder="密码" id="password" name="password" type="password" ng-model="register.password" required>
                            <span ng-show="form.password.$dirty && form.password.$error.required" class="help-block">请填密码</span>
                        </div>

                        <div class="form-group" ng-class="{ 'has-error': form.repassword.$dirty && (form.repassword.$error.required || form.repassword.$error.repassword) }">
                            <label for="repassword">密码确认</label>
                            <input class="form-control" placeholder="密码" id="repassword" name="repassword" type="password" ng-model="register.repassword" required>
                            <span ng-show="form.repassword.$dirty && form.repassword.$error.required" class="help-block">请填密码</span>
                        </div>
                        <span style="color: red" >{{register.error}}</span>
                        <input class="btn btn-lg btn-success btn-block"  type="submit" value="注册"/>
                        <div class="form-group">
                            <div class="col-md-12 control">
                                <div style="border-top: 1px solid#888; padding-top:15px; font-size:85%" >
                                    已有账号？
                                    <a href="#!/login" >
                                        点这里直接登录
                                    </a>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
